import React from 'react';
// import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
import { HashRouter as Router, Route, Switch } from 'react-router-dom'

import App from './pages/app'
import Home from './pages/home'
import Login from './pages/login'
import Detial from './pages/detail'
import NoDate from './pages/404'

export default function IRouter() {
    return <Router>
        <Switch>
            <Route exact path="/" component={App}></Route>
            <Route exact path="/home" component={Home}>
                {/* <Redirect to="/login"></Redirect> */}
            </Route>
            <Route exact path="/login" component={Login}></Route>
            <Route exact path="/detail/:id" component={Detial}></Route>
            <Route exact path="*" component={NoDate}></Route>
        </Switch>
    </Router>
}